
<table class="table table-responsive fieldlist" data-name="row[product_part]" data-template="testtpl2" data-tag="tr">
    <tr>
        <td>选择已购产品</td>
        <td></td>
    </tr>
    <tr>
        <td colspan="5"><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> 追加</a></td>
    </tr>
    <textarea name="row[product_part]" class="form-control hide" cols="30" rows="5">[]</textarea>
</table>

<div class="col-xs-12 col-sm-6">
    <div class="form-group col-sm-10">
        <label>过保类型:</label>
        {:build_radios('row[is_over]', ['1'=>__('过保'), '2'=>__('未过保')])}
    </div>
</div>
<div class="col-xs-12 col-sm-10">
    <div class="form-group col-sm-10">
        <label>问题说明:</label>
        <textarea class="form-control" rows="3" name="row[desc]" placeholder="问题说明"></textarea>
    </div>
</div>

<div class="col-xs-12 col-sm-10">
    <div class="form-group col-sm-10">
        <label>注意事项:</label>
        <textarea class="form-control" rows="3" name="row[matters]" placeholder="注意事项"></textarea>
    </div>
</div>

<div class="col-xs-12 col-sm-6">
    <div class="form-group col-sm-10">
        <label for="c-appointment_time">要求维修完成日期:</label>
        <input id="c-appointment_time" data-rule="required" class="form-control datetimepicker"
               data-date-format="YYYY-MM-DD" data-use-current="true" placeholder="要求维修完成日期" name="row[appointment_time]"
               type="text">
    </div>
</div>
<div class="col-xs-12 col-sm-10">
    <div class="form-group col-sm-10">
        <label>附件:</label>
        <div class="input-group">
            <input id="c-files" class="form-control" size="50" name="row[files]" placeholder="请上传附件" type="text"
                   value="">
            <div class="input-group-addon no-border no-padding">
                        <span><button type="button" id="plupload-avatar" class="btn btn-danger plupload"
                                      data-input-id="c-files"
                                      data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp"
                                      data-multiple="false" data-preview-id="p-collection_img"
                                      data-url="qingdongams/base/upload"><i class="fa fa-upload"></i> 上传</button></span>

            </div>
            <span class="msg-box n-right" for="c-files"></span>
        </div>
        <ul class="row list-inline plupload-preview" id="p-collection_img"></ul>
    </div>
</div>

<!--定义模板，模板语法使用Art-Template模板语法-->
<script type="text/html" id="testtpl2">
    <tr class="form-inline">
        <td>
            <input type="hidden" name="row[<%=name%>][<%=index%>][customer_product_id]" value="<%=row['customer_product_id']%>" >
            <div class="form-control" style="width: 90%">

                <a href="javascript:void(0)" class="select-product"
                   data-name="row[<%=name%>][<%=index%>][customer_product_id]"
                   data-url="qingdongams/customer/customer_product/index?isselect=1"  >
                    <% if(row['name']){%>
                    <%=row['name']%>
                    <% }else{%>
                    【请点击选择】
                    <% }%>
                </a>

            </div></td>

        <td style="width: 120px"><span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span> <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span></td>
    </tr>
</script>